'''
@Project ：my_python_project 
@File    ：01.追加信息模拟日志打印.py
@IDE     ：PyCharm 
@Author  ：xionglinhui
@Date    ：2024/7/25 上午8:27 
'''
import time
#
# '''
# 1.配合“01.实时查看日志练习.py”同时运行
# 2.终端运行“01.实时查看日志练习.py”
# '''
a = 0
with open('message.log', mode='a', encoding='utf-8') as f:

        f.write('abc')
        with open('message.log', mode='r', encoding='utf-8') as f1:
            res = f.readline()
            print(res)

        a += 1


# with open('message.log', mode='r', encoding='utf-8') as f:
#     a = f.readline()  #读取一行内容，获取字符格数
#     print(len(a))
